<?php
namespace App\Models\Factory;

use App\Models\AbsModelFactory;
use App\Models\Orm\Ali_user;
use App\Models\Orm\AliUser;
use App\Models\Orm\Cap_user;
use App\Models\Orm\Tb_user;
use App\Models\Orm\TbUser;

class AccreditFactory extends  AbsModelFactory
{


    //查看淘宝第一个表是否有该用户数据
    public static  function Taobao($uid)
    {

        $data['uid'] = $uid;
        $res = TbUser::where($data)->first();
        return empty($res)? 0:1;
    }



    public static function Ali($uid)
    {

        $data['uid'] = $uid;
        $res = AliUser::where($data)->first();
        return empty($res)? 0:1;

    }



    //查看授权第一个表是否有该用户的数据
    public static  function Cap($uid)
    {

        $data['uid'] = $uid;

        $res = Cap_user::where($data) ->first();

        return empty($res)? 0:1;


    }

}